﻿<Window x:Class="Dreambuild.Gis.Desktop.Demos.LowCarbon.ParametersWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{DynamicResource TrafficParameter}" Height="541.666" Width="801.437" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
    <StackPanel Margin="10">
        <Grid Name="TheGrid" Height="468">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="2*"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
            </Grid.RowDefinitions>

            <Grid.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="HorizontalAlignment" Value="Center" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                    <Setter Property="TextWrapping" Value="Wrap" />
                </Style>
                <Style TargetType="TextBox">
                    <Setter Property="TextAlignment" Value="Right" />
                    <Setter Property="VerticalContentAlignment" Value="Center" />
                    <Setter Property="Margin" Value="1" />
                </Style>
            </Grid.Resources>

            <Grid.Children>
                <Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource Minimum}" />
                </Border>
                <Border Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource Distance}" />
                </Border>
                <Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PopulationRatio}" />
                </Border>
                <Border Grid.Column="4" Grid.Row="0" Grid.ColumnSpan="3" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource TransportationModeShare}" />
                </Border>
                <Border Grid.Column="4" Grid.Row="1" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PedestrianAndBicycle}" />
                </Border>
                <Border Grid.Column="5" Grid.Row="1" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PrivateCars}" />
                </Border>
                <Border Grid.Column="6" Grid.Row="1" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PublicTransport}" />
                </Border>

                <Border Grid.Column="0" Grid.Row="2" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource DistanceDomain1}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="3" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource DistanceDomain2}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="4" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource DistanceDomain3}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="5" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource DistanceDomain4}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="6" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource DistanceDomain5}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="7" Background="Orange" Margin="1" >
                    <TextBlock Text="CO2 Emission PerKm/(kg/km)" />
                </Border>

                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding TripDistanceIntervalLowerLimits[0], Mode=TwoWay}" />
                <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding TripDistanceIntervalLowerLimits[1], Mode=TwoWay}" />
                <TextBox Grid.Column="1" Grid.Row="4" Text="{Binding TripDistanceIntervalLowerLimits[2], Mode=TwoWay}" />
                <TextBox Grid.Column="1" Grid.Row="5" Text="{Binding TripDistanceIntervalLowerLimits[3], Mode=TwoWay}" />
                <TextBox Grid.Column="1" Grid.Row="6" Text="{Binding TripDistanceIntervalLowerLimits[4], Mode=TwoWay}" />

                <TextBox Grid.Column="2" Grid.Row="2" Text="{Binding TripDistanceIntervalAverageDistances[0], Mode=TwoWay}" />
                <TextBox Grid.Column="2" Grid.Row="3" Text="{Binding TripDistanceIntervalAverageDistances[1], Mode=TwoWay}" />
                <TextBox Grid.Column="2" Grid.Row="4" Text="{Binding TripDistanceIntervalAverageDistances[2], Mode=TwoWay}" />
                <TextBox Grid.Column="2" Grid.Row="5" Text="{Binding TripDistanceIntervalAverageDistances[3], Mode=TwoWay}" />
                <TextBox Grid.Column="2" Grid.Row="6" Text="{Binding TripDistanceIntervalAverageDistances[4], Mode=TwoWay}" />

                <TextBox Grid.Column="3" Grid.Row="2" Text="{Binding TripDistanceIntervalProportions[0], Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="3" Text="{Binding TripDistanceIntervalProportions[1], Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="4" Text="{Binding TripDistanceIntervalProportions[2], Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="5" Text="{Binding TripDistanceIntervalProportions[3], Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="6" Text="{Binding TripDistanceIntervalProportions[4], Mode=TwoWay}" />

                <TextBox Grid.Column="4" Grid.Row="2" Text="{Binding TripMethodProportions[0][0], Mode=TwoWay}" />
                <TextBox Grid.Column="4" Grid.Row="3" Text="{Binding TripMethodProportions[1][0], Mode=TwoWay}" />
                <TextBox Grid.Column="4" Grid.Row="4" Text="{Binding TripMethodProportions[2][0], Mode=TwoWay}" />
                <TextBox Grid.Column="4" Grid.Row="5" Text="{Binding TripMethodProportions[3][0], Mode=TwoWay}" />
                <TextBox Grid.Column="4" Grid.Row="6" Text="{Binding TripMethodProportions[4][0], Mode=TwoWay}" />

                <TextBox Grid.Column="5" Grid.Row="2" Text="{Binding TripMethodProportions[0][1], Mode=TwoWay}" />
                <TextBox Grid.Column="5" Grid.Row="3" Text="{Binding TripMethodProportions[1][1], Mode=TwoWay}" />
                <TextBox Grid.Column="5" Grid.Row="4" Text="{Binding TripMethodProportions[2][1], Mode=TwoWay}" />
                <TextBox Grid.Column="5" Grid.Row="5" Text="{Binding TripMethodProportions[3][1], Mode=TwoWay}" />
                <TextBox Grid.Column="5" Grid.Row="6" Text="{Binding TripMethodProportions[4][1], Mode=TwoWay}" />

                <TextBox Grid.Column="6" Grid.Row="2" Text="{Binding TripMethodProportions[0][2], Mode=TwoWay}" />
                <TextBox Grid.Column="6" Grid.Row="3" Text="{Binding TripMethodProportions[1][2], Mode=TwoWay}" />
                <TextBox Grid.Column="6" Grid.Row="4" Text="{Binding TripMethodProportions[2][2], Mode=TwoWay}" />
                <TextBox Grid.Column="6" Grid.Row="5" Text="{Binding TripMethodProportions[3][2], Mode=TwoWay}" />
                <TextBox Grid.Column="6" Grid.Row="6" Text="{Binding TripMethodProportions[4][2], Mode=TwoWay}" />

                <TextBox Grid.Column="4" Grid.Row="7" Text="{Binding TripMethodUnitCarbonProductions[0], Mode=TwoWay}" />
                <TextBox Grid.Column="5" Grid.Row="7" Text="{Binding TripMethodUnitCarbonProductions[1], Mode=TwoWay}" />
                <TextBox Grid.Column="6" Grid.Row="7" Text="{Binding TripMethodUnitCarbonProductions[2], Mode=TwoWay}" />

                <Border Grid.Column="1" Grid.Row="9" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PerCapitaResidencial}" />
                </Border>
                <Border Grid.Column="2" Grid.Row="9" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PerCapitaOffice}" />
                </Border>
                <Border Grid.Column="3" Grid.Row="9" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PerCapitaIndustry}" />
                </Border>

                <Border Grid.Column="0" Grid.Row="10" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PerCapitaLivingSpace}" />
                </Border>

                <TextBox Grid.Column="1" Grid.Row="10" Text="{Binding PerCapitaResidencial, Mode=TwoWay}" />
                <TextBox Grid.Column="2" Grid.Row="10" Text="{Binding PerCapitaOffice, Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="10" Text="{Binding PerCapitaIndustry, Mode=TwoWay}" />

                <Border Grid.Column="1" Grid.Row="12" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource ParamCommute}" />
                </Border>
                <Border Grid.Column="2" Grid.Row="12" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource ParamSchool}" />
                </Border>
                <Border Grid.Column="3" Grid.Row="12" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource OtherActivities}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="13" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource TravelFrequency}" />
                </Border>
                <Border Grid.Column="0" Grid.Row="15" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PopulationRatioUnder18}" />
                </Border>
                <Border Grid.Column="2" Grid.Row="15" Background="Orange" Margin="1" >
                    <TextBlock Text="{DynamicResource PopulationRatioFrom18to60}" />
                </Border>

                <TextBox Grid.Column="1" Grid.Row="13" Text="{Binding TripFrequencyOfTransit, Mode=TwoWay}" />
                <TextBox Grid.Column="2" Grid.Row="13" Text="{Binding TripFrequencyOfSchool, Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="13" Text="{Binding TripFrequencyOfOtherEvent, Mode=TwoWay}" />
                <TextBox Grid.Column="1" Grid.Row="15" Text="{Binding StudentRate, Mode=TwoWay}" />
                <TextBox Grid.Column="3" Grid.Row="15" Text="{Binding AdultRate, Mode=TwoWay}" />

                <Button Grid.Column="4" Grid.Row="17" Content="{DynamicResource Confirm}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.744,0.767" Click="OK_Button_Click" Margin="1,0,0,0"/>
                <Button Grid.Column="5" Grid.Row="17" Content="{DynamicResource Cancel}" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="75" Click="Cancel_Button_Click" Margin="21,0,0,0"/>

            </Grid.Children>

        </Grid>

    </StackPanel>
</Window>
